<?php

namespace common\models;

use Yii;

/**
 * This is the model class for table "news_type".
 *
 * @property integer $id
 * @property string $name
 * @property integer $order_num
 */
class NewsType extends \yii\db\ActiveRecord
{
    /**
     * @inheritdoc
     */
    public static function tableName()
    {
        return 'news_type';
    }

    /**
     * @inheritdoc
     */
    public function rules()
    {
        return [
            [['order_num','name'], 'required'],
            [['order_num'], 'integer'],
            [['name'], 'string', 'max' => 60],
        ];
    }

    /**
     * @inheritdoc
     */
    public function attributeLabels()
    {
        return [
            'id' => 'ID',
            'name' => '名称',
            'order_num' => '排序值（越小越靠前）',
        ];
    }
}
